var e = require;
var t = module;
window.CameraManager = {
    Instance: null
};
cc.Class({
    extends: cc.Component,
    properties: {
        CameraTarget: cc.Node,
        IsSyncTargetHeight: {
            type: Boolean,
            default: !1
        },
        HeightOffset: 0,
        FollowOffset: {
            type: cc.v3,
            default: cc.v3(0, 0, 0)
        }
    },
    onLoad: function() {
        CameraManager.Instance = this
    },
    lateUpdate: function() {
        if (this.CameraTarget.parent && LevelManager.Instance.AllowAvatarControllerMove) {
            var e;
            if (this.IsSyncTargetHeight) this.node.position = this.CameraTarget.position.add(this.FollowOffset);
            else {
                e = cc.v3(this.CameraTarget.x, this.HeightOffset, this.CameraTarget.z);
                this.node.position = e.add(this.FollowOffset)
            }
        }
    }
})